//
//  NoticeOfTrialCell.m
//  e律师
//
//  Created by 韦淋 on 2017/5/31.
//  Copyright © 2017年 test. All rights reserved.
//

#import "NoticeOfTrialCell.h"

@implementation NoticeOfTrialCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initalizeInterface];
    }
    return self;
}
- (void)initalizeInterface{
    [self.contentView addSubview:self.bgView];
    [self.bgView addSubview:self.lineView];
    [self.bgView addSubview:self.titleLable];
    [self.bgView addSubview:self.contentLable];
    [self.bgView addSubview:self.dateLable];
}
- (void)layoutSubviews{
    self.bgView.frame = CGRectMake(5, 0, self.contentView.bounds.size.width - 10, self.contentView.bounds.size.height - 15);
    self.lineView.frame = CGRectMake(0, 0, self.bgView.bounds.size.width , 2);
    self.titleLable.frame = CGRectMake(5, 0, 300, 50);
    self.contentLable.frame = CGRectMake(5, 50, 350, 20);
    self.dateLable.frame = CGRectMake(250, 80, 100, 20);
    
    UIView *dividerView = [[UIView alloc] initWithFrame:CGRectMake(0, 40, self.bgView.bounds.size.width , 0.5)];
    dividerView.backgroundColor = [UIColor colorWithRed:238.0f/255.0f green:238.0f/255.0f blue:238.0f/255.0f alpha:1.0f];
    [self.bgView addSubview:dividerView];
}
- (UIView *)bgView{
    if (!_bgView) {
        _bgView = [[UIView alloc] init];
        _bgView.backgroundColor = [UIColor colorWithRed:248.0f/255.0f green:248.0f/255.0f blue:248.0f/255.0f alpha:1.0f];
        //        _bgView.layer.cornerRadius=10;
        _bgView.layer.shadowColor=[UIColor lightGrayColor].CGColor;
        _bgView.layer.shadowOffset=CGSizeMake(3, 3);
        _bgView.layer.shadowOpacity=0.5;
        //        _bgView.layer.shadowRadius=5;
        //        CGPathRef path = [UIBezierPath bezierPathWithRect:CGRectMake(0, self.bounds.size.height, [UIScreen mainScreen].bounds.size.width,2)].CGPath;
        //        [_bgView setShadowPath:path];
    }
    return _bgView;
}
- (UIView *)lineView{
    if (!_lineView) {
        _lineView = [[UIView alloc] init];
        _lineView.backgroundColor = [UIColor colorWithRed:63.0f/255.0f green:189.0f/255.0f blue:240.0f/255.0f alpha:1.0f];
    }
    return _lineView;
}
- (UILabel *)titleLable{
    if (!_titleLable) {
        _titleLable = [[UILabel alloc]init];
        _titleLable.textColor = [UIColor blackColor];
        _titleLable.font = [UIFont systemFontOfSize:15];
    }
    return _titleLable;
}
- (UILabel *)contentLable{
    if (!_contentLable) {
        _contentLable = [[UILabel alloc]init];
        _contentLable.textColor = [UIColor blackColor];
        _contentLable.font = [UIFont systemFontOfSize:11];
        _contentLable.numberOfLines = 2;
        _contentLable.lineBreakMode = NSLineBreakByTruncatingTail;
        //        _sTitleLable.backgroundColor = [UIColor redColor];
    }
    return _contentLable;
}
- (UILabel *)dateLable{
    if (!_dateLable) {
        _dateLable = [[UILabel alloc]init];
        _dateLable.textColor = [UIColor blackColor];
        _dateLable.font = [UIFont systemFontOfSize:10];
        _dateLable.textAlignment = NSTextAlignmentCenter;
        
    }
    return _dateLable;
}


@end
